package org.example.myleet.p1486;

public class Solution {
    public int xorOperation(int n, int start) {
        int reply = start;
        for (int i = 1; i < n; ++i) {
            reply ^= (start + 2 * i);
        }
        return reply;
    }
}
